local zhuqiu = fk.CreateSkill {
  name = "lvshi__zhuqiu",
}

Fk:loadTranslationTable{
  ["lvshi__zhuqiu"] = "筑丘",
  [":lvshi__zhuqiu"] = "当你成为非火【杀】的目标后，你可将手牌补至四张，然后此【杀】结算后，若你的手牌数大于体力值，此【杀】的使用者视为对你使用【调虎离山】。",

  ["$lvshi__zhuqiu1"] = "列之所至，白马为证！",
  ["$lvshi__zhuqiu2"] = "避敌锋芒，以守为攻！",
}

zhuqiu:addEffect(fk.TargetConfirmed, {
  anim_type = "defensive",
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(zhuqiu.name) and data.firstTarget and data.card.trueName == "slash"
    and player:getHandcardNum() < 4 and not string.find(data.card.name, "fire__slash")
  end,
  on_use = function(self, event, target, player, data)
    player:drawCards(4 - player:getHandcardNum(), zhuqiu.name)
    data.extra_data = data.extra_data or {}
    data.extra_data.ls__zhuqiu = data.extra_data.ls__zhuqiu or {} 
    table.insertIfNeed(data.extra_data.ls__zhuqiu, player.id)
  end,
})

zhuqiu:addEffect(fk.CardUseFinished, {
  mute = true,
  is_delay_effect = true,
  can_trigger = function(self, event, target, player, data)
    return data.card.trueName == "slash" and player:hasSkill(zhuqiu.name) and player:getHandcardNum() > player.hp
    and data.extra_data and data.extra_data.ls__zhuqiu and data.from:isAlive()
    and table.contains(data.extra_data.ls__zhuqiu, player.id)
  end,
  on_use = function(self, event, target, player, data)
    player.room:useVirtualCard("lvshi__lure_tiger", nil, target, player, zhuqiu.name, true)
  end,
})

return zhuqiu